using YatFram;

namespace Examples.StringTemplate
{
    public static class Arrangements
    {
        public static YatFram<StringTemplateContext> HaveATemplateWithoutAnyHoles(this YatFram<StringTemplateContext> test)
        {
            test.Context.TemplateData = Templates.WithoutHoles;
            return test;
        }
        public static YatFram<StringTemplateContext> HaveATemplateWithHoles(this YatFram<StringTemplateContext> test)
        {
            test.Context.TemplateData = Templates.WithAHole;
            return test;
        }

        public static YatFram<StringTemplateContext> HaveTheValuesToFillTheHoles(this YatFram<StringTemplateContext> test)
        {
            test.Context.PropertyBag = test.Context.TemplateData.PropertyBag;
            test.Context.Renderers = test.Context.TemplateData.Renderers;
            return test;
        }

        public static YatFram<StringTemplateContext> HaveATemplateWithAHoleWhichReferencesAnotherTemplate(this YatFram<StringTemplateContext> test)
        {
            test.Context.TemplateData = Templates.WithSubtemplate;
            return test;
        }

        public static YatFram<StringTemplateContext> HaveTheOtherTemplate(this YatFram<StringTemplateContext> test)
        {
            return test;
        }   
     
        public static YatFram<StringTemplateContext> HaveATemplateForRenerderingObjects(this YatFram<StringTemplateContext> test)
        {
            test.Context.TemplateData = Templates.ObjectRender;
            return test;
        }

    }
}